home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / pc / egyptw.dir / 01710_Script_Home < prev    next >
Text File  |  1995-09-13  |  7KB  |  306 lines

  1. global gQuest, gBeenClicked, gHouseIsOpen
  2.  
  3. on EHomeRollovers
  4.   set gBeenClicked = 0
  5.   if (not(CheckClickedStatus(gQuest))) then
  6.     if the mouseCast = the castnum of sprite 10 then
  7.       repeat while the mouseCast = the castnum of sprite 10
  8.         EgyptCursor
  9.         set the locH of sprite 12 to 203
  10.         set the locV of sprite 12 to 325
  11.         updatestage
  12.         if the mousedown then
  13.           RemoveTheHouse
  14.         end if
  15.       end repeat
  16.       set the locH of sprite 12 to 900
  17.       updatestage
  18.     else
  19.       if rollover(13) then
  20.         ArrowCursor
  21.         repeat while rollover(13)
  22.           if gHouseIsOpen = 1 then
  23.             set the locH of sprite 14 to 363
  24.             set the locV of sprite 14 to 246
  25.             updatestage
  26.           else
  27.             set the locH of sprite 15 to 364
  28.             set the locV of sprite 15 to 242
  29.             updatestage
  30.           end if
  31.         end repeat
  32.         set the locH of sprite 14 to 963
  33.         set the locH of sprite 15 to 964
  34.         updatestage
  35.       else
  36.         if rollover(8) then
  37.           MoveTheGoat
  38.         else
  39.           if rollover(41) then
  40.             HandCursor
  41.           else
  42.             if rollover(42) then
  43.               HandCursor
  44.             else
  45.               ArrowCursor
  46.             end if
  47.           end if
  48.         end if
  49.       end if
  50.     end if
  51.   end if
  52.   RandomQuestion(gQuest)
  53. end
  54.  
  55. on ERoom1Rollovers
  56.   if rollover(12) then
  57.     ArrowCursor
  58.     repeat while rollover(12)
  59.       set the locH of sprite 13 to 315
  60.       set the locV of sprite 13 to 113
  61.       updatestage
  62.     end repeat
  63.     set the locH of sprite 13 to 915
  64.     updatestage
  65.   else
  66.     if rollover(14) then
  67.       ArrowCursor
  68.       repeat while rollover(14)
  69.         set the locH of sprite 15 to 199
  70.         set the locV of sprite 15 to 149
  71.         updatestage
  72.       end repeat
  73.       set the locH of sprite 15 to 999
  74.       updatestage
  75.     else
  76.       if rollover(8) then
  77.         MoveTheGoat
  78.       else
  79.         if rollover(41) then
  80.           HandCursor
  81.         else
  82.           if rollover(42) then
  83.             HandCursor
  84.           else
  85.             ArrowCursor
  86.           end if
  87.         end if
  88.       end if
  89.     end if
  90.   end if
  91. end
  92.  
  93. on ERoom2Rollovers
  94.   if rollover(12) then
  95.     ArrowCursor
  96.     repeat while rollover(12)
  97.       set the locH of sprite 13 to 436
  98.       set the locV of sprite 13 to 221
  99.       updatestage
  100.     end repeat
  101.   else
  102.     if rollover(8) then
  103.       MoveTheGoat
  104.     else
  105.       if rollover(41) then
  106.         HandCursor
  107.       else
  108.         if rollover(42) then
  109.           HandCursor
  110.         else
  111.           ArrowCursor
  112.         end if
  113.       end if
  114.     end if
  115.   end if
  116. end
  117.  
  118. on ERoom3Rollovers
  119.   if rollover(12) then
  120.     ArrowCursor
  121.     repeat while rollover(12)
  122.       set the locH of sprite 13 to 366
  123.       set the locV of sprite 13 to 150
  124.       updatestage
  125.     end repeat
  126.   else
  127.     if rollover(14) then
  128.       ArrowCursor
  129.       repeat while rollover(14)
  130.         set the locH of sprite 15 to 447
  131.         set the locV of sprite 15 to 225
  132.         updatestage
  133.       end repeat
  134.     else
  135.       if rollover(16) then
  136.         ArrowCursor
  137.         repeat while rollover(16)
  138.           set the locH of sprite 17 to 552
  139.           set the locV of sprite 17 to 387
  140.           updatestage
  141.         end repeat
  142.       else
  143.         if rollover(8) then
  144.           MoveTheGoat
  145.         else
  146.           if rollover(41) then
  147.             HandCursor
  148.           else
  149.             if rollover(42) then
  150.               HandCursor
  151.             else
  152.               ArrowCursor
  153.             end if
  154.           end if
  155.         end if
  156.       end if
  157.     end if
  158.   end if
  159. end
  160.  
  161. on ERoom4Rollovers
  162.   if rollover(12) then
  163.     ArrowCursor
  164.     repeat while rollover(12)
  165.       set the locH of sprite 13 to 389
  166.       set the locV of sprite 13 to 362
  167.       updatestage
  168.     end repeat
  169.   else
  170.     if rollover(14) then
  171.       ArrowCursor
  172.       repeat while rollover(14)
  173.         set the locH of sprite 15 to 529
  174.         set the locV of sprite 15 to 131
  175.         updatestage
  176.       end repeat
  177.     else
  178.       if rollover(16) then
  179.         ArrowCursor
  180.         repeat while rollover(16)
  181.           set the locH of sprite 17 to 355
  182.           set the locV of sprite 17 to 118
  183.           updatestage
  184.         end repeat
  185.       else
  186.         if rollover(18) then
  187.           ArrowCursor
  188.           repeat while rollover(18)
  189.             set the locH of sprite 24 to 460
  190.             set the locV of sprite 24 to 247
  191.             updatestage
  192.           end repeat
  193.         else
  194.           if rollover(25) then
  195.             ArrowCursor
  196.             repeat while rollover(25)
  197.               set the locH of sprite 26 to 457
  198.               set the locV of sprite 26 to 314
  199.               updatestage
  200.             end repeat
  201.           else
  202.             if rollover(27) then
  203.               ArrowCursor
  204.               repeat while rollover(27)
  205.                 set the locH of sprite 28 to 551
  206.                 set the locV of sprite 28 to 387
  207.                 updatestage
  208.               end repeat
  209.             else
  210.               if rollover(8) then
  211.                 MoveTheGoat
  212.               else
  213.                 if rollover(9) then
  214.                   ArrowCursor
  215.                   repeat while rollover(9)
  216.                     set the locH of sprite 23 to 201
  217.                     set the locV of sprite 23 to 148
  218.                     updatestage
  219.                   end repeat
  220.                 else
  221.                   if rollover(41) then
  222.                     HandCursor
  223.                   else
  224.                     if rollover(42) then
  225.                       HandCursor
  226.                     else
  227.                       ArrowCursor
  228.                     end if
  229.                   end if
  230.                 end if
  231.               end if
  232.             end if
  233.           end if 
  234.         end if
  235.       end if
  236.     end if
  237.   end if
  238. end
  239.  
  240. on RemoveTheHouse
  241.   puppetsound "SE300500.AIF"
  242.   updatestage
  243.   wait .5
  244.   set gHouseIsOpen = 1
  245.   puppetsprite 10, true
  246.   set the locH of sprite 10 to 900
  247.   updatestage
  248. end
  249.  
  250. on ReplaceTheHouse
  251.   set gHouseIsOpen = 0
  252.   set the locH of sprite 10 to 458
  253.   set the locV of sprite 10 to 321
  254.   puppetsprite 10, false
  255.   puppetsprite 8, false
  256.   updatestage
  257.   go "YourHomeX"
  258. end
  259.  
  260. on ResetYourHome
  261.   set the locH of sprite 10 to 458
  262.   set the locV of sprite 10 to 321
  263.   puppetsprite 8, false
  264.   go "YourHomeX"
  265. end
  266.  
  267. on MoveTheGoat
  268.   set beingdragged = 0
  269.   HandCursor
  270.   repeat while rollover(8) and the mousedown
  271.     set the constraint of sprite 8 to 7
  272.     set beingdragged = 1
  273.     set the locH of sprite 8 = the mouseH
  274.     set the locV of sprite 8 = the mouseV
  275.     updatestage
  276.   end repeat
  277.   if beingdragged = 1 then
  278.     if sprite 8 intersects 19 then
  279.       resetQuestionMark(gQuest)
  280.       go "Room1"
  281.       abort
  282.     else
  283.       if sprite 8 intersects 20 then
  284.         resetQuestionMark(gQuest)
  285.         go "Room2"
  286.         abort
  287.       else
  288.         if sprite 8 intersects 21 then
  289.           resetQuestionMark(gQuest)
  290.           go "Room3"
  291.           abort
  292.         else
  293.           if sprite 8 intersects 22 then
  294.             resetQuestionMark(gQuest)
  295.             go "Room4"
  296.             abort
  297.           else
  298.             go "YourHomeX"
  299.           end if
  300.         end if
  301.       end if
  302.     end if
  303.   end if
  304. end
  305.  
  306.